theSum = 0
count = 0
while True:
    num = input("请输入要求平均值的数(如果你想要停止,请输入分号): ")
    if num == ';':break#分号表示运行结束
    num = float(num)
    theSum += num
    count += 1
print(f'平均值为{theSum / count}')
